home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / X11 / XDrawRectangle.z / XDrawRectangle
Encoding:
Text File  |  2002-10-03  |  5.4 KB  |  133 lines

  1.  
  2.  
  3.  
  4.      XXXXDDDDrrrraaaawwwwRRRReeeeccccttttaaaannnngggglllleeee((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXDDDDrrrraaaawwwwRRRReeeeccccttttaaaannnngggglllleeee((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XDrawRectangle, XDrawRectangles, XRectangle - draw
  10.           rectangles and rectangles structure
  11.  
  12.      SSSSYYYYNNNNTTTTAAAAXXXX
  13.           XDrawRectangle(_d_i_s_p_l_a_y, _d, _g_c, _x, _y, _w_i_d_t_h, _h_e_i_g_h_t)
  14.                 Display *_d_i_s_p_l_a_y;
  15.                 Drawable _d;
  16.                 GC _g_c;
  17.                 int _x, _y;
  18.                 unsigned int _w_i_d_t_h, _h_e_i_g_h_t;
  19.  
  20.           XDrawRectangles(_d_i_s_p_l_a_y, _d, _g_c, _r_e_c_t_a_n_g_l_e_s, _n_r_e_c_t_a_n_g_l_e_s)
  21.                 Display *_d_i_s_p_l_a_y;
  22.                 Drawable _d;
  23.                 GC _g_c;
  24.                 XRectangle _r_e_c_t_a_n_g_l_e_s[];
  25.                 int _n_r_e_c_t_a_n_g_l_e_s;
  26.  
  27.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  28.           _d         Specifies the drawable.
  29.  
  30.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  31.  
  32.           _g_c        Specifies the GC.
  33.  
  34.           _n_r_e_c_t_a_n_g_l_e_s
  35.                     Specifies the number of rectangles in the array.
  36.  
  37.           _r_e_c_t_a_n_g_l_e_s
  38.                     Specifies an array of rectangles.
  39.  
  40.           _w_i_d_t_h
  41.           _h_e_i_g_h_t    Specify the width and height, which specify the
  42.                     dimensions of the rectangle.
  43.  
  44.           _x
  45.           _y         Specify the x and y coordinates, which specify the
  46.                     upper-left corner of the rectangle.
  47.  
  48.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  49.           The _X_D_r_a_w_R_e_c_t_a_n_g_l_e and _X_D_r_a_w_R_e_c_t_a_n_g_l_e_s functions draw the
  50.           outlines of the specified rectangle or rectangles as if a
  51.           five-point _P_o_l_y_L_i_n_e protocol request were specified for each
  52.           rectangle:
  53.  
  54.                [x,y] [x+width,y] [x+width,y+height] [x,y+height] [x,y]
  55.  
  56.           For the specified rectangle or rectangles, these functions
  57.           do not draw a pixel more than once.  _X_D_r_a_w_R_e_c_t_a_n_g_l_e_s draws
  58.           the rectangles in the order listed in the array.  If
  59.           rectangles intersect, the intersecting pixels are drawn
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 10/3/02)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXDDDDrrrraaaawwwwRRRReeeeccccttttaaaannnngggglllleeee((((3333XXXX11111111))))XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....6666))))XXXXDDDDrrrraaaawwwwRRRReeeeccccttttaaaannnngggglllleeee((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           multiple times.
  75.  
  76.           Both functions use these GC components: function, plane-
  77.           mask, line-width, line-style, cap-style, join-style, fill-
  78.           style, subwindow-mode, clip-x-origin, clip-y-origin, and
  79.           clip-mask.  They also use these GC mode-dependent
  80.           components: foreground, background, tile, stipple, tile-
  81.           stipple-x-origin, tile-stipple-y-origin, dash-offset, and
  82.           dash-list.
  83.  
  84.           _X_D_r_a_w_R_e_c_t_a_n_g_l_e and _X_D_r_a_w_R_e_c_t_a_n_g_l_e_s can generate _B_a_d_D_r_a_w_a_b_l_e,
  85.           _B_a_d_G_C, and _B_a_d_M_a_t_c_h errors.
  86.  
  87.      SSSSTTTTRRRRUUUUCCCCTTTTUUUURRRREEEESSSS
  88.           The _X_R_e_c_t_a_n_g_l_e structure contains:
  89.  
  90.           typedef struct {
  91.                short x, y;
  92.                unsigned short width, height;
  93.           } XRectangle;
  94.  
  95.           All x and y members are signed integers.  The width and
  96.           height members are 16-bit unsigned integers.  You should be
  97.           careful not to generate coordinates and sizes out of the
  98.           16-bit ranges, because the protocol only has 16-bit fields
  99.           for these values.
  100.  
  101.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  102.           _B_a_d_D_r_a_w_a_b_l_e
  103.                     A value for a Drawable argument does not name a
  104.                     defined Window or Pixmap.
  105.  
  106.           _B_a_d_G_C     A value for a GContext argument does not name a
  107.                     defined GContext.
  108.  
  109.           _B_a_d_M_a_t_c_h  An _I_n_p_u_t_O_n_l_y window is used as a Drawable.
  110.  
  111.           _B_a_d_M_a_t_c_h  Some argument or pair of arguments has the correct
  112.                     type and range but fails to match in some other
  113.                     way required by the request.
  114.  
  115.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  116.           XDrawArc(3X11), XDrawLine(3X11), XDrawPoint(3X11)
  117.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 10/3/02)
  130.  
  131.  
  132.  
  133.